package com.itheima.tlias84.controller.po;


import jakarta.validation.constraints.NotNull;
import jakarta.validation.constraints.Pattern;
import lombok.Data;
import org.hibernate.validator.constraints.Length;

import java.time.LocalDate;
import java.util.List;

@Data
public class InsertEmpParam {
    private Integer id;

    @NotNull
    @Length(min = 2, max = 20, message = "用户名不能为空")
    private String username;

    @NotNull
    @Length(min = 2, max = 10, message = "姓名不能为空")
    private String name;

    private int gender;
    private String image;
    private Integer deptId;
    private LocalDate entryDate;
    private Integer job;
    private Integer salary;
    private List<InsertExprParam> exprList;

    @Length(min = 11, max = 11, message = "手机号格式不正确")
    @Pattern(regexp = "^1[3-9]\\d{9}$", message = "手机号格式不正确")
    private String phone;
}
